package com.qf.flower_service.dao.mapper;

import com.qf.flower_service.entity.Flowers;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface FlowersMapper extends Mapper<Flowers> {


    @Select("SELECT * FROM flowers f INNER JOIN flower_type_detail fd on f.flower_id = fd.flower_id WHERE detail_id = #{detailId} AND flower_name LIKE #{flowerName}")
    List<Flowers> findByDetailIdAndLinkFlowerName(@Param("detailId") Long detailId,@Param("flowerName") String flowerName);
}
